home *** CD-ROM | disk | FTP | other *** search
/ Languguage OS 2 / Languguage OS II Version 10-94 (Knowledge Media)(1994).ISO / gnu / flex_247.zip / flex_247 / skel.c < prev    next >
C/C++ Source or Header  |  1994-08-03  |  34KB  |  1,233 lines

  1. /* File created from flex.skel via mkskel.sh */
  2.  
  3. #include "flexdef.h"
  4.  
  5. char *skel[] = {
  6.   "/* A lexical scanner generated by flex */",
  7.   "",
  8.   "/* Scanner skeleton version:",
  9.   " * $Header: /home/daffy/u0/vern/flex/flex-2.4.7/RCS/flex.skl,v 1.2 94/08/03 11:13:24 vern Exp $",
  10.   " */",
  11.   "",
  12.   "#define FLEX_SCANNER",
  13.   "",
  14.   "%-",
  15.   "#include <stdio.h>",
  16.   "%*",
  17.   "",
  18.   "",
  19.   "/* cfront 1.2 defines \"c_plusplus\" instead of \"__cplusplus\" */",
  20.   "#ifdef c_plusplus",
  21.   "#ifndef __cplusplus",
  22.   "#define __cplusplus",
  23.   "#endif",
  24.   "#endif",
  25.   "",
  26.   "",
  27.   "#ifdef __cplusplus",
  28.   "",
  29.   "#include <stdlib.h>",
  30.   "%+",
  31.   "class istream;",
  32.   "%*",
  33.   "#include <unistd.h>",
  34.   "",
  35.   "/* Use prototypes in function declarations. */",
  36.   "#define YY_USE_PROTOS",
  37.   "",
  38.   "/* The \"const\" storage-class-modifier is valid. */",
  39.   "#define YY_USE_CONST",
  40.   "",
  41.   "#else    /* ! __cplusplus */",
  42.   "",
  43.   "#ifdef __STDC__",
  44.   "",
  45.   "#define YY_USE_PROTOS",
  46.   "#define YY_USE_CONST",
  47.   "",
  48.   "#endif    /* __STDC__ */",
  49.   "#endif    /* ! __cplusplus */",
  50.   "",
  51.   "",
  52.   "#ifdef __TURBOC__",
  53.   "#define YY_USE_CONST",
  54.   "#endif",
  55.   "",
  56.   "",
  57.   "#ifndef YY_USE_CONST",
  58.   "#ifndef const",
  59.   "#define const",
  60.   "#endif",
  61.   "#endif",
  62.   "",
  63.   "",
  64.   "#ifdef YY_USE_PROTOS",
  65.   "#define YY_PROTO(proto) proto",
  66.   "#else",
  67.   "#define YY_PROTO(proto) ()",
  68.   "#endif",
  69.   "",
  70.   "/* Returned upon end-of-file. */",
  71.   "#define YY_NULL 0",
  72.   "",
  73.   "/* Promotes a possibly negative, possibly signed char to an unsigned",
  74.   " * integer for use as an array index.  If the signed char is negative,",
  75.   " * we want to instead treat it as an 8-bit unsigned char, hence the",
  76.   " * double cast.",
  77.   " */",
  78.   "#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)",
  79.   "",
  80.   "/* Enter a start condition.  This macro really ought to take a parameter,",
  81.   " * but we do it the disgusting crufty way forced on us by the ()-less",
  82.   " * definition of BEGIN.",
  83.   " */",
  84.   "#define BEGIN yy_start = 1 + 2 *",
  85.   "",
  86.   "/* Translate the current start state into a value that can be later handed",
  87.   " * to BEGIN to return to the state.",
  88.   " */",
  89.   "#define YY_START ((yy_start - 1) / 2)",
  90.   "",
  91.   "/* Action number for EOF rule of a given start state. */",
  92.   "#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)",
  93.   "",
  94.   "/* Special action meaning \"start processing a new file\".  Now included",
  95.   " * only for backward compatibility with previous versions of flex.",
  96.   " */",
  97.   "#define YY_NEW_FILE yyrestart( yyin )",
  98.   "",
  99.   "#define YY_END_OF_BUFFER_CHAR 0",
  100.   "",
  101.   "/* Size of default input buffer. */",
  102.   "#define YY_BUF_SIZE 16384",
  103.   "",
  104.   "typedef struct yy_buffer_state *YY_BUFFER_STATE;",
  105.   "",
  106.   "extern int yyleng;",
  107.   "%-",
  108.   "extern FILE *yyin, *yyout;",
  109.   "%*",
  110.   "",
  111.   "#ifdef __cplusplus",
  112.   "extern \"C\" {",
  113.   "#endif",
  114.   "    extern int yywrap YY_PROTO(( void ));",
  115.   "#ifdef __cplusplus",
  116.   "    }",
  117.   "#endif",
  118.   "",
  119.   "#define EOB_ACT_CONTINUE_SCAN 0",
  120.   "#define EOB_ACT_END_OF_FILE 1",
  121.   "#define EOB_ACT_LAST_MATCH 2",
  122.   "",
  123.   "/* The funky do-while in the following #define is used to turn the definition",
  124.   " * int a single C statement (which needs a semi-colon terminator).  This",
  125.   " * avoids problems with code like:",
  126.   " *",
  127.   " *     if ( condition_holds )",
  128.   " *        yyless( 5 );",
  129.   " *    else",
  130.   " *        do_something_else();",
  131.   " *",
  132.   " * Prior to using the do-while the compiler would get upset at the",
  133.   " * \"else\" because it interpreted the \"if\" statement as being all",
  134.   " * done when it reached the ';' after the yyless() call.",
  135.   " */",
  136.   "",
  137.   "/* Return all but the first 'n' matched characters back to the input stream. */",
  138.   "",
  139.   "#define yyless(n) \\",
  140.   "    do \\",
  141.   "        { \\",
  142.   "        /* Undo effects of setting up yytext. */ \\",
  143.   "        *yy_cp = yy_hold_char; \\",
  144.   "        yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \\",
  145.   "        YY_DO_BEFORE_ACTION; /* set up yytext again */ \\",
  146.   "        } \\",
  147.   "    while ( 0 )",
  148.   "",
  149.   "#define unput(c) yyunput( c, yytext_ptr )",
  150.   "",
  151.   "",
  152.   "struct yy_buffer_state",
  153.   "    {",
  154.   "%-",
  155.   "    FILE *yy_input_file;",
  156.   "%+",
  157.   "    istream* yy_input_file;",
  158.   "%*",
  159.   "",
  160.   "    char *yy_ch_buf;        /* input buffer */",
  161.   "    char *yy_buf_pos;        /* current position in input buffer */",
  162.   "",
  163.   "    /* Size of input buffer in bytes, not including room for EOB",
  164.   "     * characters.",
  165.   "     */",
  166.   "    int yy_buf_size;",
  167.   "",
  168.   "    /* Number of characters read into yy_ch_buf, not including EOB",
  169.   "     * characters.",
  170.   "     */",
  171.   "    int yy_n_chars;",
  172.   "",
  173.   "    /* Whether this is an \"interactive\" input source; if so, and",
  174.   "     * if we're using stdio for input, then we want to use getc()",
  175.   "     * instead of fread(), to make sure we stop fetching input after",
  176.   "     * each newline.",
  177.   "     */",
  178.   "    int yy_is_interactive;",
  179.   "",
  180.   "    /* Whether to try to fill the input buffer when we reach the",
  181.   "     * end of it.",
  182.   "     */",
  183.   "    int yy_fill_buffer;",
  184.   "",
  185.   "    int yy_buffer_status;",
  186.   "#define YY_BUFFER_NEW 0",
  187.   "#define YY_BUFFER_NORMAL 1",
  188.   "    /* When an EOF's been seen but there's still some text to process",
  189.   "     * then we mark the buffer as YY_EOF_PENDING, to indicate that we",
  190.   "     * shouldn't try reading from the input source any more.  We might",
  191.   "     * still have a bunch of tokens to match, though, because of",
  192.   "     * possible backing-up.",
  193.   "     *",
  194.   "     * When we actually see the EOF, we change the status to \"new\"",
  195.   "     * (via yyrestart()), so that the user can continue scanning by",
  196.   "     * just pointing yyin at a new input file.",
  197.   "     */",
  198.   "#define YY_BUFFER_EOF_PENDING 2",
  199.   "    };",
  200.   "",
  201.   "%- Standard (non-C++) definition",
  202.   "static YY_BUFFER_STATE yy_current_buffer = 0;",
  203.   "%*",
  204.   "",
  205.   "/* We provide macros for accessing buffer states in case in the",
  206.   " * future we want to put the buffer states in a more general",
  207.   " * \"scanner state\".",
  208.   " */",
  209.   "#define YY_CURRENT_BUFFER yy_current_buffer",
  210.   "",
  211.   "",
  212.   "%- Standard (non-C++) definition",
  213.   "/* yy_hold_char holds the character lost when yytext is formed. */",
  214.   "static char yy_hold_char;",
  215.   "",
  216.   "static int yy_n_chars;        /* number of characters read into yy_ch_buf */",
  217.   "",
  218.   "",
  219.   "int yyleng;",
  220.   "",
  221.   "/* Points to current character in buffer. */",
  222.   "static char *yy_c_buf_p = (char *) 0;",
  223.   "static int yy_init = 1;        /* whether we need to initialize */",
  224.   "static int yy_start = 0;    /* start state number */",
  225.   "",
  226.   "/* Flag which is used to allow yywrap()'s to do buffer switches",
  227.   " * instead of setting up a fresh yyin.  A bit of a hack ...",
  228.   " */",
  229.   "static int yy_did_buffer_switch_on_eof;",
  230.   "",
  231.   "static void yyunput YY_PROTO(( int c, char *buf_ptr ));",
  232.   "void yyrestart YY_PROTO(( FILE *input_file ));",
  233.   "void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));",
  234.   "void yy_load_buffer_state YY_PROTO(( void ));",
  235.   "YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size ));",
  236.   "void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));",
  237.   "void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));",
  238.   "",
  239.   "static int yy_start_stack_ptr = 0;",
  240.   "static int yy_start_stack_depth = 0;",
  241.   "static int *yy_start_stack = 0;",
  242.   "static void yy_push_state YY_PROTO(( int new_state ));",
  243.   "static void yy_pop_state YY_PROTO(( void ));",
  244.   "static int yy_top_state YY_PROTO(( void ));",
  245.   "%*",
  246.   "",
  247.   "static void *yy_flex_alloc YY_PROTO(( unsigned int ));",
  248.   "static void *yy_flex_realloc YY_PROTO(( void *, unsigned int ));",
  249.   "static void yy_flex_free YY_PROTO(( void * ));",
  250.   "",
  251.   "#define yy_new_buffer yy_create_buffer",
  252.   "",
  253.   "%% yytext/yyin/yyout/yy_state_type/yylineno etc. def's & init go here",
  254.   "",
  255.   "#ifndef yytext_ptr",
  256.   "static void yy_flex_strncpy YY_PROTO(( char *, const char *, int ));",
  257.   "#endif",
  258.   "",
  259.   "%- Standard (non-C++) definition",
  260.   "#ifdef __cplusplus",
  261.   "static int yyinput YY_PROTO(( void ));",
  262.   "#else",
  263.   "static int input YY_PROTO(( void ));",
  264.   "#endif",
  265.   "%*",
  266.   "",
  267.   "%- Standard (non-C++) definition",
  268.   "static yy_state_type yy_get_previous_state YY_PROTO(( void ));",
  269.   "static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));",
  270.   "static int yy_get_next_buffer YY_PROTO(( void ));",
  271.   "static void yy_fatal_error YY_PROTO(( const char msg[] ));",
  272.   "%*",
  273.   "",
  274.   "/* Done after the current pattern has been matched and before the",
  275.   " * corresponding action - sets up yytext.",
  276.   " */",
  277.   "#define YY_DO_BEFORE_ACTION \\",
  278.   "    yytext_ptr = yy_bp; \\",
  279.   "%% code to fiddle yytext and yyleng for yymore() goes here",
  280.   "    yy_hold_char = *yy_cp; \\",
  281.   "    *yy_cp = '\\0'; \\",
  282.   "%% code to copy yytext_ptr to yytext[] goes here, if %array",
  283.   "    yy_c_buf_p = yy_cp;",
  284.   "",
  285.   "%% data tables for the DFA and the user's section 1 definitions go here",
  286.   "",
  287.   "/* Macros after this point can all be overridden by user definitions in",
  288.   " * section 1.",
  289.   " */",
  290.   "",
  291.   "#ifdef YY_MALLOC_DECL",
  292.   "YY_MALLOC_DECL",
  293.   "#else",
  294.   "#if __STDC__",
  295.   "#ifndef __cplusplus",
  296.   "#include <stdlib.h>",
  297.   "#endif",
  298.   "#else",
  299.   "/* Just try to get by without declaring the routines.  This will fail",
  300.   " * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)",
  301.   " * or sizeof(void*) != sizeof(int).",
  302.   " */",
  303.   "#endif",
  304.   "#endif",
  305.   "",
  306.   "/* Amount of stuff to slurp up with each read. */",
  307.   "#ifndef YY_READ_BUF_SIZE",
  308.   "#define YY_READ_BUF_SIZE 8192",
  309.   "#endif",
  310.   "",
  311.   "/* Copy whatever the last rule matched to the standard output. */",
  312.   "",
  313.   "#ifndef ECHO",
  314.   "%- Standard (non-C++) definition",
  315.   "/* This used to be an fputs(), but since the string might contain NUL's,",
  316.   " * we now use fwrite().",
  317.   " */",
  318.   "#define ECHO (void) fwrite( yytext, yyleng, 1, yyout )",
  319.   "%+ C++ definition",
  320.   "#define ECHO LexerOutput( yytext, yyleng )",
  321.   "%*",
  322.   "#endif",
  323.   "",
  324.   "/* Gets input and stuffs it into \"buf\".  number of characters read, or YY_NULL,",
  325.   " * is returned in \"result\".",
  326.   " */",
  327.   "#ifndef YY_INPUT",
  328.   "#define YY_INPUT(buf,result,max_size) \\",
  329.   "%% fread()/read() definition of YY_INPUT goes here unless we're doing C++",
  330.   "%+ C++ definition",
  331.   "    if ( (result = LexerInput( (char *) buf, max_size )) < 0 ) \\",
  332.   "        YY_FATAL_ERROR( \"input in flex scanner failed\" );",
  333.   "%*",
  334.   "#endif",
  335.   "",
  336.   "/* No semi-colon after return; correct usage is to write \"yyterminate();\" -",
  337.   " * we don't want an extra ';' after the \"return\" because that will cause",
  338.   " * some compilers to complain about unreachable statements.",
  339.   " */",
  340.   "#ifndef yyterminate",
  341.   "#define yyterminate() return YY_NULL",
  342.   "#endif",
  343.   "",
  344.   "/* Number of entries by which start-condition stack grows. */",
  345.   "#ifndef YY_START_STACK_INCR",
  346.   "#define YY_START_STACK_INCR 25",
  347.   "#endif",
  348.   "",
  349.   "/* Report a fatal error. */",
  350.   "#ifndef YY_FATAL_ERROR",
  351.   "%-",
  352.   "#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )",
  353.   "%+",
  354.   "#define YY_FATAL_ERROR(msg) LexerError( msg )",
  355.   "%*",
  356.   "#endif",
  357.   "",
  358.   "/* Default declaration of generated scanner - a define so the user can",
  359.   " * easily add parameters.",
  360.   " */",
  361.   "#ifndef YY_DECL",
  362.   "%- Standard (non-C++) definition",
  363.   "#define YY_DECL int yylex YY_PROTO(( void ))",
  364.   "%+ C++ definition",
  365.   "#define YY_DECL int yyFlexLexer::yylex()",
  366.   "%*",
  367.   "#endif",
  368.   "",
  369.   "/* Code executed at the beginning of each rule, after yytext and yyleng",
  370.   " * have been set up.",
  371.   " */",
  372.   "#ifndef YY_USER_ACTION",
  373.   "#define YY_USER_ACTION",
  374.   "#endif",
  375.   "",
  376.   "/* Code executed at the end of each rule. */",
  377.   "#ifndef YY_BREAK",
  378.   "#define YY_BREAK break;",
  379.   "#endif",
  380.   "",
  381.   "YY_DECL",
  382.   "    {",
  383.   "    register yy_state_type yy_current_state;",
  384.   "    register char *yy_cp, *yy_bp;",
  385.   "    register int yy_act;",
  386.   "",
  387.   "%% user's declarations go here",
  388.   "",
  389.   "    if ( yy_init )",
  390.   "        {",
  391.   "#ifdef YY_USER_INIT",
  392.   "        YY_USER_INIT;",
  393.   "#endif",
  394.   "",
  395.   "        if ( ! yy_start )",
  396.   "            yy_start = 1;    /* first start state */",
  397.   "",
  398.   "        if ( ! yyin )",
  399.   "%-",
  400.   "            yyin = stdin;",
  401.   "%+",
  402.   "            yyin = &cin;",
  403.   "%*",
  404.   "",
  405.   "        if ( ! yyout )",
  406.   "%-",
  407.   "            yyout = stdout;",
  408.   "%+",
  409.   "            yyout = &cout;",
  410.   "%*",
  411.   "",
  412.   "        if ( yy_current_buffer )",
  413.   "            yy_init_buffer( yy_current_buffer, yyin );",
  414.   "        else",
  415.   "            yy_current_buffer =",
  416.   "                yy_create_buffer( yyin, YY_BUF_SIZE );",
  417.   "",
  418.   "        yy_load_buffer_state();",
  419.   "",
  420.   "        yy_init = 0;",
  421.   "        }",
  422.   "",
  423.   "    while ( 1 )        /* loops until end-of-file is reached */",
  424.   "        {",
  425.   "%% yymore()-related code goes here",
  426.   "        yy_cp = yy_c_buf_p;",
  427.   "",
  428.   "        /* Support of yytext. */",
  429.   "        *yy_cp = yy_hold_char;",
  430.   "",
  431.   "        /* yy_bp points to the position in yy_ch_buf of the start of",
  432.   "         * the current run.",
  433.   "         */",
  434.   "        yy_bp = yy_cp;",
  435.   "",
  436.   "%% code to set up and find next match goes here",
  437.   "",
  438.   "yy_find_action:",
  439.   "%% code to find the action number goes here",
  440.   "",
  441.   "        YY_DO_BEFORE_ACTION;",
  442.   "",
  443.   "%% code for yylineno update goes here, if -l option",
  444.   "",
  445.   "do_action:    /* This label is used only to access EOF actions. */",
  446.   "",
  447.   "%% debug code goes here",
  448.   "",
  449.   "        switch ( yy_act )",
  450.   "    { /* beginning of action switch */",
  451.   "%% actions go here",
  452.   "",
  453.   "    case YY_END_OF_BUFFER:",
  454.   "        {",
  455.   "        /* Amount of text matched not including the EOB char. */",
  456.   "        int yy_amount_of_matched_text = yy_cp - yytext_ptr - 1;",
  457.   "",
  458.   "        /* Undo the effects of YY_DO_BEFORE_ACTION. */",
  459.   "        *yy_cp = yy_hold_char;",
  460.   "",
  461.   "        if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )",
  462.   "            {",
  463.   "            /* We're scanning a new file or input source.  It's",
  464.   "             * possible that this happened because the user",
  465.   "             * just pointed yyin at a new source and called",
  466.   "             * yylex().  If so, then we have to assure",
  467.   "             * consistency between yy_current_buffer and our",
  468.   "             * globals.  Here is the right place to do so, because",
  469.   "             * this is the first action (other than possibly a",
  470.   "             * back-up) that will match for the new input source.",
  471.   "             */",
  472.   "            yy_n_chars = yy_current_buffer->yy_n_chars;",
  473.   "            yy_current_buffer->yy_input_file = yyin;",
  474.   "            yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;",
  475.   "            }",
  476.   "",
  477.   "        /* Note that here we test for yy_c_buf_p \"<=\" to the position",
  478.   "         * of the first EOB in the buffer, since yy_c_buf_p will",
  479.   "         * already have been incremented past the NUL character",
  480.   "         * (since all states make transitions on EOB to the",
  481.   "         * end-of-buffer state).  Contrast this with the test",
  482.   "         * in input().",
  483.   "         */",
  484.   "        if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )",
  485.   "            { /* This was really a NUL. */",
  486.   "            yy_state_type yy_next_state;",
  487.   "",
  488.   "            yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;",
  489.   "",
  490.   "            yy_current_state = yy_get_previous_state();",
  491.   "",
  492.   "            /* Okay, we're now positioned to make the NUL",
  493.   "             * transition.  We couldn't have",
  494.   "             * yy_get_previous_state() go ahead and do it",
  495.   "             * for us because it doesn't know how to deal",
  496.   "             * with the possibility of jamming (and we don't",
  497.   "             * want to build jamming into it because then it",
  498.   "             * will run more slowly).",
  499.   "             */",
  500.   "",
  501.   "            yy_next_state = yy_try_NUL_trans( yy_current_state );",
  502.   "",
  503.   "            yy_bp = yytext_ptr + YY_MORE_ADJ;",
  504.   "",
  505.   "            if ( yy_next_state )",
  506.   "                {",
  507.   "                /* Consume the NUL. */",
  508.   "                yy_cp = ++yy_c_buf_p;",
  509.   "                yy_current_state = yy_next_state;",
  510.   "                goto yy_match;",
  511.   "                }",
  512.   "",
  513.   "            else",
  514.   "                {",
  515.   "%% code to do back-up for compressed tables and set up yy_cp goes here",
  516.   "                goto yy_find_action;",
  517.   "                }",
  518.   "            }",
  519.   "",
  520.   "        else switch ( yy_get_next_buffer() )",
  521.   "            {",
  522.   "            case EOB_ACT_END_OF_FILE:",
  523.   "                {",
  524.   "                yy_did_buffer_switch_on_eof = 0;",
  525.   "",
  526.   "                if ( yywrap() )",
  527.   "                    {",
  528.   "                    /* Note: because we've taken care in",
  529.   "                     * yy_get_next_buffer() to have set up",
  530.   "                     * yytext, we can now set up",
  531.   "                     * yy_c_buf_p so that if some total",
  532.   "                     * hoser (like flex itself) wants to",
  533.   "                     * call the scanner after we return the",
  534.   "                     * YY_NULL, it'll still work - another",
  535.   "                     * YY_NULL will get returned.",
  536.   "                     */",
  537.   "                    yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;",
  538.   "",
  539.   "                    yy_act = YY_STATE_EOF(YY_START);",
  540.   "                    goto do_action;",
  541.   "                    }",
  542.   "",
  543.   "                else",
  544.   "                    {",
  545.   "                    if ( ! yy_did_buffer_switch_on_eof )",
  546.   "                        YY_NEW_FILE;",
  547.   "                    }",
  548.   "                break;",
  549.   "                }",
  550.   "",
  551.   "            case EOB_ACT_CONTINUE_SCAN:",
  552.   "                yy_c_buf_p =",
  553.   "                    yytext_ptr + yy_amount_of_matched_text;",
  554.   "",
  555.   "                yy_current_state = yy_get_previous_state();",
  556.   "",
  557.   "                yy_cp = yy_c_buf_p;",
  558.   "                yy_bp = yytext_ptr + YY_MORE_ADJ;",
  559.   "                goto yy_match;",
  560.   "",
  561.   "            case EOB_ACT_LAST_MATCH:",
  562.   "                yy_c_buf_p =",
  563.   "                &yy_current_buffer->yy_ch_buf[yy_n_chars];",
  564.   "",
  565.   "                yy_current_state = yy_get_previous_state();",
  566.   "",
  567.   "                yy_cp = yy_c_buf_p;",
  568.   "                yy_bp = yytext_ptr + YY_MORE_ADJ;",
  569.   "                goto yy_find_action;",
  570.   "            }",
  571.   "        break;",
  572.   "        }",
  573.   "",
  574.   "    default:",
  575.   "        YY_FATAL_ERROR(",
  576.   "            \"fatal flex scanner internal error--no action found\" );",
  577.   "    } /* end of action switch */",
  578.   "        } /* end of scanning one token */",
  579.   "    } /* end of yylex */",
  580.   "",
  581.   "%+",
  582.   "#ifdef YY_INTERACTIVE",
  583.   "int yyFlexLexer::LexerInput( char* buf, int /* max_size */ )",
  584.   "#else",
  585.   "int yyFlexLexer::LexerInput( char* buf, int max_size )",
  586.   "#endif",
  587.   "    {",
  588.   "    if ( yyin->eof() || yyin->fail() )",
  589.   "        return 0;",
  590.   "",
  591.   "#ifdef YY_INTERACTIVE",
  592.   "    yyin->get( buf[0] );",
  593.   "",
  594.   "    if ( yyin->eof() )",
  595.   "        return 0;",
  596.   "",
  597.   "    if ( yyin->bad() )",
  598.   "        return -1;",
  599.   "",
  600.   "    return 1;",
  601.   "",
  602.   "#else",
  603.   "    (void) yyin->read( buf, max_size );",
  604.   "",
  605.   "    if ( yyin->bad() )",
  606.   "        return -1;",
  607.   "    else",
  608.   "        return yyin->gcount();",
  609.   "#endif",
  610.   "    }",
  611.   "",
  612.   "void yyFlexLexer::LexerOutput( const char* buf, int size )",
  613.   "    {",
  614.   "    (void) yyout->write( buf, size );",
  615.   "    }",
  616.   "%*",
  617.   "",
  618.   "/* yy_get_next_buffer - try to read in a new buffer",
  619.   " *",
  620.   " * Returns a code representing an action:",
  621.   " *    EOB_ACT_LAST_MATCH -",
  622.   " *    EOB_ACT_CONTINUE_SCAN - continue scanning from current position",
  623.   " *    EOB_ACT_END_OF_FILE - end of file",
  624.   " */",
  625.   "",
  626.   "%-",
  627.   "static int yy_get_next_buffer()",
  628.   "%+",
  629.   "int yyFlexLexer::yy_get_next_buffer()",
  630.   "%*",
  631.   "    {",
  632.   "    register char *dest = yy_current_buffer->yy_ch_buf;",
  633.   "    register char *source = yytext_ptr - 1; /* copy prev. char, too */",
  634.   "    register int number_to_move, i;",
  635.   "    int ret_val;",
  636.   "",
  637.   "    if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )",
  638.   "        YY_FATAL_ERROR(",
  639.   "        \"fatal flex scanner internal error--end of buffer missed\" );",
  640.   "",
  641.   "    if ( yy_current_buffer->yy_fill_buffer == 0 )",
  642.   "        { /* Don't try to fill the buffer, so this is an EOF. */",
  643.   "        if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )",
  644.   "            {",
  645.   "            /* We matched a singled characater, the EOB, so",
  646.   "             * treat this as a final EOF.",
  647.   "             */",
  648.   "            return EOB_ACT_END_OF_FILE;",
  649.   "            }",
  650.   "",
  651.   "        else",
  652.   "            {",
  653.   "            /* We matched some text prior to the EOB, first",
  654.   "             * process it.",
  655.   "             */",
  656.   "            return EOB_ACT_LAST_MATCH;",
  657.   "            }",
  658.   "        }",
  659.   "",
  660.   "    /* Try to read more data. */",
  661.   "",
  662.   "    /* First move last chars to start of buffer. */",
  663.   "    number_to_move = yy_c_buf_p - yytext_ptr;",
  664.   "",
  665.   "    for ( i = 0; i < number_to_move; ++i )",
  666.   "        *(dest++) = *(source++);",
  667.   "",
  668.   "    if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )",
  669.   "        /* don't do the read, it's not guaranteed to return an EOF,",
  670.   "         * just force an EOF",
  671.   "         */",
  672.   "        yy_n_chars = 0;",
  673.   "",
  674.   "    else",
  675.   "        {",
  676.   "        int num_to_read =",
  677.   "            yy_current_buffer->yy_buf_size - number_to_move - 1;",
  678.   "",
  679.   "        while ( num_to_read <= 0 )",
  680.   "            { /* Not enough room in the buffer - grow it. */",
  681.   "#ifdef YY_USES_REJECT",
  682.   "            YY_FATAL_ERROR(",
  683.   "\"input buffer overflow, can't enlarge buffer because scanner uses REJECT\" );",
  684.   "#else",
  685.   "",
  686.   "            /* just a shorter name for the current buffer */",
  687.   "            YY_BUFFER_STATE b = yy_current_buffer;",
  688.   "",
  689.   "            int yy_c_buf_p_offset = yy_c_buf_p - b->yy_ch_buf;",
  690.   "",
  691.   "            b->yy_buf_size *= 2;",
  692.   "            b->yy_ch_buf = (char *)",
  693.   "                yy_flex_realloc( (void *) b->yy_ch_buf,",
  694.   "                         b->yy_buf_size );",
  695.   "",
  696.   "            if ( ! b->yy_ch_buf )",
  697.   "                YY_FATAL_ERROR(",
  698.   "                \"fatal error - scanner input buffer overflow\" );",
  699.   "",
  700.   "            yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];",
  701.   "",
  702.   "            num_to_read = yy_current_buffer->yy_buf_size -",
  703.   "                        number_to_move - 1;",
  704.   "#endif",
  705.   "            }",
  706.   "",
  707.   "        if ( num_to_read > YY_READ_BUF_SIZE )",
  708.   "            num_to_read = YY_READ_BUF_SIZE;",
  709.   "",
  710.   "        /* Read in more data. */",
  711.   "        YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),",
  712.   "            yy_n_chars, num_to_read );",
  713.   "        }",
  714.   "",
  715.   "    if ( yy_n_chars == 0 )",
  716.   "        {",
  717.   "        if ( number_to_move - YY_MORE_ADJ == 1 )",
  718.   "            {",
  719.   "            ret_val = EOB_ACT_END_OF_FILE;",
  720.   "            yyrestart( yyin );",
  721.   "            }",
  722.   "",
  723.   "        else",
  724.   "            {",
  725.   "            ret_val = EOB_ACT_LAST_MATCH;",
  726.   "            yy_current_buffer->yy_buffer_status =",
  727.   "                YY_BUFFER_EOF_PENDING;",
  728.   "            }",
  729.   "        }",
  730.   "",
  731.   "    else",
  732.   "        ret_val = EOB_ACT_CONTINUE_SCAN;",
  733.   "",
  734.   "    yy_n_chars += number_to_move;",
  735.   "    yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;",
  736.   "    yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;",
  737.   "",
  738.   "    /* yytext begins at the second character in yy_ch_buf; the first",
  739.   "     * character is the one which preceded it before reading in the latest",
  740.   "     * buffer; it needs to be kept around in case it's a newline, so",
  741.   "     * yy_get_previous_state() will have with '^' rules active.",
  742.   "     */",
  743.   "",
  744.   "    yytext_ptr = &yy_current_buffer->yy_ch_buf[1];",
  745.   "",
  746.   "    return ret_val;",
  747.   "    }",
  748.   "",
  749.   "",
  750.   "/* yy_get_previous_state - get the state just before the EOB char was reached */",
  751.   "",
  752.   "%-",
  753.   "static yy_state_type yy_get_previous_state()",
  754.   "%+",
  755.   "yy_state_type yyFlexLexer::yy_get_previous_state()",
  756.   "%*",
  757.   "    {",
  758.   "    register yy_state_type yy_current_state;",
  759.   "    register char *yy_cp;",
  760.   "",
  761.   "%% code to get the start state into yy_current_state goes here",
  762.   "",
  763.   "    for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )",
  764.   "        {",
  765.   "%% code to find the next state goes here",
  766.   "        }",
  767.   "",
  768.   "    return yy_current_state;",
  769.   "    }",
  770.   "",
  771.   "",
  772.   "/* yy_try_NUL_trans - try to make a transition on the NUL character",
  773.   " *",
  774.   " * synopsis",
  775.   " *    next_state = yy_try_NUL_trans( current_state );",
  776.   " */",
  777.   "",
  778.   "%-",
  779.   "#ifdef YY_USE_PROTOS",
  780.   "static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )",
  781.   "#else",
  782.   "static yy_state_type yy_try_NUL_trans( yy_current_state )",
  783.   "yy_state_type yy_current_state;",
  784.   "#endif",
  785.   "%+",
  786.   "yy_state_type yyFlexLexer::yy_try_NUL_trans( yy_state_type yy_current_state )",
  787.   "%*",
  788.   "    {",
  789.   "    register int yy_is_jam;",
  790.   "%% code to find the next state, and perhaps do backing up, goes here",
  791.   "",
  792.   "    return yy_is_jam ? 0 : yy_current_state;",
  793.   "    }",
  794.   "",
  795.   "",
  796.   "%-",
  797.   "#ifdef YY_USE_PROTOS",
  798.   "static void yyunput( int c, register char *yy_bp )",
  799.   "#else",
  800.   "static void yyunput( c, yy_bp )",
  801.   "int c;",
  802.   "register char *yy_bp;",
  803.   "#endif",
  804.   "%+",
  805.   "void yyFlexLexer::yyunput( int c, register char* yy_bp )",
  806.   "%*",
  807.   "    {",
  808.   "    register char *yy_cp = yy_c_buf_p;",
  809.   "",
  810.   "    /* undo effects of setting up yytext */",
  811.   "    *yy_cp = yy_hold_char;",
  812.   "",
  813.   "    if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )",
  814.   "        { /* need to shift things up to make room */",
  815.   "        /* +2 for EOB chars. */",
  816.   "        register int number_to_move = yy_n_chars + 2;",
  817.   "        register char *dest = &yy_current_buffer->yy_ch_buf[",
  818.   "                    yy_current_buffer->yy_buf_size + 2];",
  819.   "        register char *source =",
  820.   "                &yy_current_buffer->yy_ch_buf[number_to_move];",
  821.   "",
  822.   "        while ( source > yy_current_buffer->yy_ch_buf )",
  823.   "            *--dest = *--source;",
  824.   "",
  825.   "        yy_cp += dest - source;",
  826.   "        yy_bp += dest - source;",
  827.   "        yy_n_chars = yy_current_buffer->yy_buf_size;",
  828.   "",
  829.   "        if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )",
  830.   "            YY_FATAL_ERROR( \"flex scanner push-back overflow\" );",
  831.   "        }",
  832.   "",
  833.   "    if ( yy_cp > yy_bp && yy_cp[-1] == '\\n' )",
  834.   "        yy_cp[-2] = '\\n';",
  835.   "",
  836.   "    *--yy_cp = (char) c;",
  837.   "",
  838.   "%% update yylineno here, if doing -l",
  839.   "",
  840.   "    /* Note: the formal parameter *must* be called \"yy_bp\" for this",
  841.   "     * macro to now work correctly.",
  842.   "     */",
  843.   "    YY_DO_BEFORE_ACTION; /* set up yytext again */",
  844.   "    }",
  845.   "",
  846.   "",
  847.   "%-",
  848.   "#ifdef __cplusplus",
  849.   "static int yyinput()",
  850.   "#else",
  851.   "static int input()",
  852.   "#endif",
  853.   "%+",
  854.   "int yyFlexLexer::yyinput()",
  855.   "%*",
  856.   "    {",
  857.   "    int c;",
  858.   "",
  859.   "    *yy_c_buf_p = yy_hold_char;",
  860.   "",
  861.   "    if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )",
  862.   "        {",
  863.   "        /* yy_c_buf_p now points to the character we want to return.",
  864.   "         * If this occurs *before* the EOB characters, then it's a",
  865.   "         * valid NUL; if not, then we've hit the end of the buffer.",
  866.   "         */",
  867.   "        if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )",
  868.   "            /* This was really a NUL. */",
  869.   "            *yy_c_buf_p = '\\0';",
  870.   "",
  871.   "        else",
  872.   "            { /* need more input */",
  873.   "            yytext_ptr = yy_c_buf_p;",
  874.   "            ++yy_c_buf_p;",
  875.   "",
  876.   "            switch ( yy_get_next_buffer() )",
  877.   "                {",
  878.   "                case EOB_ACT_END_OF_FILE:",
  879.   "                    {",
  880.   "                    if ( yywrap() )",
  881.   "                        {",
  882.   "                        yy_c_buf_p =",
  883.   "                        yytext_ptr + YY_MORE_ADJ;",
  884.   "                        return EOF;",
  885.   "                        }",
  886.   "",
  887.   "                    YY_NEW_FILE;",
  888.   "#ifdef __cplusplus",
  889.   "                    return yyinput();",
  890.   "#else",
  891.   "                    return input();",
  892.   "#endif",
  893.   "                    }",
  894.   "",
  895.   "                case EOB_ACT_CONTINUE_SCAN:",
  896.   "                    yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;",
  897.   "                    break;",
  898.   "",
  899.   "                case EOB_ACT_LAST_MATCH:",
  900.   "#ifdef __cplusplus",
  901.   "                    YY_FATAL_ERROR(",
  902.   "                    \"unexpected last match in yyinput()\" );",
  903.   "#else",
  904.   "                    YY_FATAL_ERROR(",
  905.   "                    \"unexpected last match in input()\" );",
  906.   "#endif",
  907.   "                }",
  908.   "            }",
  909.   "        }",
  910.   "",
  911.   "    c = *(unsigned char *) yy_c_buf_p;    /* cast for 8-bit char's */",
  912.   "    *yy_c_buf_p = '\\0';    /* preserve yytext */",
  913.   "    yy_hold_char = *++yy_c_buf_p;",
  914.   "",
  915.   "    return c;",
  916.   "    }",
  917.   "",
  918.   "",
  919.   "%-",
  920.   "#ifdef YY_USE_PROTOS",
  921.   "void yyrestart( FILE *input_file )",
  922.   "#else",
  923.   "void yyrestart( input_file )",
  924.   "FILE *input_file;",
  925.   "#endif",
  926.   "%+",
  927.   "void yyFlexLexer::yyrestart( istream* input_file )",
  928.   "%*",
  929.   "    {",
  930.   "    if ( ! yy_current_buffer )",
  931.   "        yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );",
  932.   "",
  933.   "    yy_init_buffer( yy_current_buffer, input_file );",
  934.   "    yy_load_buffer_state();",
  935.   "    }",
  936.   "",
  937.   "",
  938.   "%-",
  939.   "#ifdef YY_USE_PROTOS",
  940.   "void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )",
  941.   "#else",
  942.   "void yy_switch_to_buffer( new_buffer )",
  943.   "YY_BUFFER_STATE new_buffer;",
  944.   "#endif",
  945.   "%+",
  946.   "void yyFlexLexer::yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )",
  947.   "%*",
  948.   "    {",
  949.   "    if ( yy_current_buffer == new_buffer )",
  950.   "        return;",
  951.   "",
  952.   "    if ( yy_current_buffer )",
  953.   "        {",
  954.   "        /* Flush out information for old buffer. */",
  955.   "        *yy_c_buf_p = yy_hold_char;",
  956.   "        yy_current_buffer->yy_buf_pos = yy_c_buf_p;",
  957.   "        yy_current_buffer->yy_n_chars = yy_n_chars;",
  958.   "        }",
  959.   "",
  960.   "    yy_current_buffer = new_buffer;",
  961.   "    yy_load_buffer_state();",
  962.   "",
  963.   "    /* We don't actually know whether we did this switch during",
  964.   "     * EOF (yywrap()) processing, but the only time this flag",
  965.   "     * is looked at is after yywrap() is called, so it's safe",
  966.   "     * to go ahead and always set it.",
  967.   "     */",
  968.   "    yy_did_buffer_switch_on_eof = 1;",
  969.   "    }",
  970.   "",
  971.   "",
  972.   "%-",
  973.   "#ifdef YY_USE_PROTOS",
  974.   "void yy_load_buffer_state( void )",
  975.   "#else",
  976.   "void yy_load_buffer_state()",
  977.   "#endif",
  978.   "%+",
  979.   "void yyFlexLexer::yy_load_buffer_state()",
  980.   "%*",
  981.   "    {",
  982.   "    yy_n_chars = yy_current_buffer->yy_n_chars;",
  983.   "    yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;",
  984.   "    yyin = yy_current_buffer->yy_input_file;",
  985.   "    yy_hold_char = *yy_c_buf_p;",
  986.   "    }",
  987.   "",
  988.   "",
  989.   "%-",
  990.   "#ifdef YY_USE_PROTOS",
  991.   "YY_BUFFER_STATE yy_create_buffer( FILE *file, int size )",
  992.   "#else",
  993.   "YY_BUFFER_STATE yy_create_buffer( file, size )",
  994.   "FILE *file;",
  995.   "int size;",
  996.   "#endif",
  997.   "%+",
  998.   "YY_BUFFER_STATE yyFlexLexer::yy_create_buffer( istream* file, int size )",
  999.   "%*",
  1000.   "    {",
  1001.   "    YY_BUFFER_STATE b;",
  1002.   "",
  1003.   "    b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );",
  1004.   "",
  1005.   "    if ( ! b )",
  1006.   "        YY_FATAL_ERROR( \"out of dynamic memory in yy_create_buffer()\" );",
  1007.   "",
  1008.   "    b->yy_buf_size = size;",
  1009.   "",
  1010.   "    /* yy_ch_buf has to be 2 characters longer than the size given because",
  1011.   "     * we need to put in 2 end-of-buffer characters.",
  1012.   "     */",
  1013.   "    b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );",
  1014.   "",
  1015.   "    if ( ! b->yy_ch_buf )",
  1016.   "        YY_FATAL_ERROR( \"out of dynamic memory in yy_create_buffer()\" );",
  1017.   "",
  1018.   "    yy_init_buffer( b, file );",
  1019.   "",
  1020.   "    return b;",
  1021.   "    }",
  1022.   "",
  1023.   "",
  1024.   "%-",
  1025.   "#ifdef YY_USE_PROTOS",
  1026.   "void yy_delete_buffer( YY_BUFFER_STATE b )",
  1027.   "#else",
  1028.   "void yy_delete_buffer( b )",
  1029.   "YY_BUFFER_STATE b;",
  1030.   "#endif",
  1031.   "%+",
  1032.   "void yyFlexLexer::yy_delete_buffer( YY_BUFFER_STATE b )",
  1033.   "%*",
  1034.   "    {",
  1035.   "    if ( b == yy_current_buffer )",
  1036.   "        yy_current_buffer = (YY_BUFFER_STATE) 0;",
  1037.   "",
  1038.   "    yy_flex_free( (void *) b->yy_ch_buf );",
  1039.   "    yy_flex_free( (void *) b );",
  1040.   "    }",
  1041.   "",
  1042.   "",
  1043.   "%-",
  1044.   "#ifdef YY_USE_PROTOS",
  1045.   "void yy_init_buffer( YY_BUFFER_STATE b, FILE *file )",
  1046.   "#else",
  1047.   "void yy_init_buffer( b, file )",
  1048.   "YY_BUFFER_STATE b;",
  1049.   "FILE *file;",
  1050.   "#endif",
  1051.   "%+",
  1052.   "void yyFlexLexer::yy_init_buffer( YY_BUFFER_STATE b, istream* file )",
  1053.   "%*",
  1054.   "    {",
  1055.   "    b->yy_input_file = file;",
  1056.   "",
  1057.   "    /* We put in the '\\n' and start reading from [1] so that an",
  1058.   "     * initial match-at-newline will be true.",
  1059.   "     */",
  1060.   "",
  1061.   "    b->yy_ch_buf[0] = '\\n';",
  1062.   "    b->yy_n_chars = 1;",
  1063.   "",
  1064.   "    /* We always need two end-of-buffer characters.  The first causes",
  1065.   "     * a transition to the end-of-buffer state.  The second causes",
  1066.   "     * a jam in that state.",
  1067.   "     */",
  1068.   "    b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;",
  1069.   "    b->yy_ch_buf[2] = YY_END_OF_BUFFER_CHAR;",
  1070.   "",
  1071.   "    b->yy_buf_pos = &b->yy_ch_buf[1];",
  1072.   "",
  1073.   "%-",
  1074.   "    b->yy_is_interactive = file ? isatty( fileno(file) ) : 0;",
  1075.   "%+",
  1076.   "    b->yy_is_interactive = 0;",
  1077.   "%*",
  1078.   "",
  1079.   "    b->yy_fill_buffer = 1;",
  1080.   "",
  1081.   "    b->yy_buffer_status = YY_BUFFER_NEW;",
  1082.   "    }",
  1083.   "",
  1084.   "",
  1085.   "%-",
  1086.   "#ifdef YY_USE_PROTOS",
  1087.   "static void yy_push_state( int new_state )",
  1088.   "#else",
  1089.   "static void yy_push_state( new_state )",
  1090.   "int new_state;",
  1091.   "#endif",
  1092.   "%+",
  1093.   "void yyFlexLexer::yy_push_state( int new_state )",
  1094.   "%*",
  1095.   "    {",
  1096.   "    if ( yy_start_stack_ptr >= yy_start_stack_depth )",
  1097.   "        {",
  1098.   "        int new_size;",
  1099.   "",
  1100.   "        yy_start_stack_depth += YY_START_STACK_INCR;",
  1101.   "        new_size = yy_start_stack_depth * sizeof( int );",
  1102.   "",
  1103.   "        if ( ! yy_start_stack )",
  1104.   "            yy_start_stack = (int *) yy_flex_alloc( new_size );",
  1105.   "",
  1106.   "        else",
  1107.   "            yy_start_stack = (int *) yy_flex_realloc(",
  1108.   "                    (void *) yy_start_stack, new_size );",
  1109.   "",
  1110.   "        if ( ! yy_start_stack )",
  1111.   "            YY_FATAL_ERROR(",
  1112.   "            \"out of memory expanding start-condition stack\" );",
  1113.   "        }",
  1114.   "",
  1115.   "    yy_start_stack[yy_start_stack_ptr++] = YY_START;",
  1116.   "",
  1117.   "    BEGIN(new_state);",
  1118.   "    }",
  1119.   "",
  1120.   "",
  1121.   "%-",
  1122.   "static void yy_pop_state()",
  1123.   "%+",
  1124.   "void yyFlexLexer::yy_pop_state()",
  1125.   "%*",
  1126.   "    {",
  1127.   "    if ( --yy_start_stack_ptr < 0 )",
  1128.   "        YY_FATAL_ERROR( \"start-condition stack underflow\" );",
  1129.   "",
  1130.   "    BEGIN(yy_start_stack[yy_start_stack_ptr]);",
  1131.   "    }",
  1132.   "",
  1133.   "",
  1134.   "%-",
  1135.   "static int yy_top_state()",
  1136.   "%+",
  1137.   "int yyFlexLexer::yy_top_state()",
  1138.   "%*",
  1139.   "    {",
  1140.   "    return yy_start_stack[yy_start_stack_ptr - 1];",
  1141.   "    }",
  1142.   "",
  1143.   "",
  1144.   "%-",
  1145.   "#ifdef YY_USE_PROTOS",
  1146.   "static void yy_fatal_error( const char msg[] )",
  1147.   "#else",
  1148.   "static void yy_fatal_error( msg )",
  1149.   "char msg[];",
  1150.   "#endif",
  1151.   "    {",
  1152.   "    (void) fprintf( stderr, \"%s\\n\", msg );",
  1153.   "    exit( 1 );",
  1154.   "    }",
  1155.   "",
  1156.   "%+",
  1157.   "",
  1158.   "void yyFlexLexer::LexerError( const char msg[] )",
  1159.   "    {",
  1160.   "    cerr << msg << '\\n';",
  1161.   "    exit( 1 );",
  1162.   "    }",
  1163.   "%*",
  1164.   "",
  1165.   "",
  1166.   "/* Redefine yyless() so it works in section 3 code. */",
  1167.   "",
  1168.   "#undef yyless",
  1169.   "#define yyless(n) \\",
  1170.   "    do \\",
  1171.   "        { \\",
  1172.   "        /* Undo effects of setting up yytext. */ \\",
  1173.   "        yytext[yyleng] = yy_hold_char; \\",
  1174.   "        yy_c_buf_p = yytext + n - YY_MORE_ADJ; \\",
  1175.   "        yy_hold_char = *yy_c_buf_p; \\",
  1176.   "        *yy_c_buf_p = '\\0'; \\",
  1177.   "        yyleng = n; \\",
  1178.   "        } \\",
  1179.   "    while ( 0 )",
  1180.   "",
  1181.   "",
  1182.   "/* Internal utility routines. */",
  1183.   "",
  1184.   "#ifndef yytext_ptr",
  1185.   "#ifdef YY_USE_PROTOS",
  1186.   "static void yy_flex_strncpy( char *s1, const char *s2, int n )",
  1187.   "#else",
  1188.   "static void yy_flex_strncpy( s1, s2, n )",
  1189.   "char *s1;",
  1190.   "const char *s2;",
  1191.   "int n;",
  1192.   "#endif",
  1193.   "    {",
  1194.   "    register int i;",
  1195.   "    for ( i = 0; i < n; ++i )",
  1196.   "        s1[i] = s2[i];",
  1197.   "    }",
  1198.   "#endif",
  1199.   "",
  1200.   "",
  1201.   "#ifdef YY_USE_PROTOS",
  1202.   "static void *yy_flex_alloc( unsigned int size )",
  1203.   "#else",
  1204.   "static void *yy_flex_alloc( size )",
  1205.   "unsigned int size;",
  1206.   "#endif",
  1207.   "    {",
  1208.   "    return (void *) malloc( size );",
  1209.   "    }",
  1210.   "",
  1211.   "#ifdef YY_USE_PROTOS",
  1212.   "static void *yy_flex_realloc( void *ptr, unsigned int size )",
  1213.   "#else",
  1214.   "static void *yy_flex_realloc( ptr, size )",
  1215.   "void *ptr;",
  1216.   "unsigned int size;",
  1217.   "#endif",
  1218.   "    {",
  1219.   "    return (void *) realloc( ptr, size );",
  1220.   "    }",
  1221.   "",
  1222.   "#ifdef YY_USE_PROTOS",
  1223.   "static void yy_flex_free( void *ptr )",
  1224.   "#else",
  1225.   "static void yy_flex_free( ptr )",
  1226.   "void *ptr;",
  1227.   "#endif",
  1228.   "    {",
  1229.   "    free( ptr );",
  1230.   "    }",
  1231.   0
  1232. };
  1233.